package com.glq1218.controller;

import com.glq1218.domain.vo.LoginVo;
import com.glq1218.domain.vo.UserInfoVo;
import com.glq1218.response.ResponseResult;
import com.glq1218.service.LoginService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
public class LoginController {

    @Autowired
    private LoginService loginService;

    @PostMapping("/login")
    public ResponseResult<UserInfoVo> login(@RequestBody LoginVo loginVo) {
        return loginService.login(loginVo);
    }
}
